﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DC2010.Objects;
using DC2010.Objects.Data;
using Microsoft.Xna.Framework.Graphics;
using RolePlaying;
using Xna.Base;
using Microsoft.Xna.Framework;

namespace DC2010
{
    public partial class Hud
    {
        public void DrawScroll()
        {
            SpriteBatch spriteBatch = screenManager.SpriteBatch;
            if (Root.I.GameSystem.SelectedMember != null)
            {
                CreatureData cd = Root.I.GameSystem.SelectedMember;
                ItemData id = cd.Inventory.GetItemAtPosition(CarryLocations.LeftHand).GetItemDataFromCode();

                //is something in left hand?
                if (id != null)
                {
                    if (!string.IsNullOrEmpty(id.ItemMessage))
                    {
                        spriteBatch.Draw(TM.GetTex("Interface/OpenScroll"), RM.Get("Inventory_Scroll").GetVector(), Color.White);

                        //write message 106,36,1
                        spriteBatch.DrawString(Fonts.PlayerNameFont, id.ItemMessage, RM.Get("Inventory_Scroll").GetVector() + new Vector2(91, 20), Color.Brown);
                    }
                }
            }
        }
    }
}
